<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>home</title>
</head>
<body>

<h4>上海新冠疫情</h4>
    <!--通过改变form标签中method属性来改变数据请求的方式-->
    <form action="http://localhost:5000/query" method="POST">
        街道（小区）:<input type="text" name="name" autocomplete="off"><br/><br/>

        <button onclick="myFunction()">提交</button>
        <p id="demo"></p>
    </form>
<script>
        function myFunction(){

        }
    </script>

    <table class="table table-striped">
    <thead>
    <tr>
        <th scope="col">#</th>
        <th scope="col">区名称</th>
        <th scope="col">最新确诊时间</th>
        <th scope="col">街道（小区）</th>
        <th scope="col">预计解封时间</th>
    </tr>
    </thead>
    <tbody>

        {% for result in results %}
        <tr>
            <th scope="row">{{ result.id}}</th>
            <td>{{ result.area_name}}</td>
            <td style="color: red">{{ result.latest_diagnosis_time}}</td>
            <td>{{ result.street}}</td>
            <td style="color:green;">{{ result.unsealing_time}}</td>
        </tr>
        {% endfor %}
        <tr>
        <td colspan="5" class="text-center">预计解封时间：根据现行疫情管理政策，以及最近一次阳性确诊时间+14天。（实际解封日期以当地居委或政府实际通知为准，本日期仅供参考）</td>
    </tr>
    </tbody>
</table>

</body>
</html>